package com.woniuxy.secondhand.controller;


import com.woniuxy.life.core.api.CommonResult;
import com.woniuxy.secondhand.entity.SecChatmsg;
import com.woniuxy.secondhand.service.SecChatmsgService;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 聊天信息 前端控制器
 * </p>
 *
 * @author chaohuijiang
 * @since 2020-09-24
 */
@RestController
@RequestMapping("/secondhand/sec-chatmsg")
public class SecChatmsgController {
    @Resource
    SecChatmsgService secChatmsgService;
//发信息
    public CommonResult<SecChatmsg> chat(){
        return null;
    }
    //删除信息
    public CommonResult<SecChatmsg> delete(Integer chatmsgId){
       boolean re= secChatmsgService.removeById(chatmsgId);
       if (re){
           return CommonResult.success();
       }
       return CommonResult.failed();
    }
}
